home *** CD-ROM | disk | FTP | other *** search
- 100 goto 6490
- 110 :
- 120 n$="power of logic": n$=left$(n$,12)
- 130 open 1,8,15,("s:"+n$+".bak"): close 1
- 140 open 1,8,15,("r:"+n$+".bak="+n$+".bas"): close 1
- 150 save (n$+".bas"),8: verify (n$+".bas"),8
- 160 end
- 170 :
- 180 n$="printercodes": rem zum drucken run 180
- 190 open 1,8,2,(n$+",p,r")
- 200 get#1,i$: d1%=asc(i$+chr$(0))
- 210 get#1,i$: d2%=asc(i$+chr$(0))
- 220 get#1,i$: i%=asc(i$+chr$(0)): in$=""
- 230 if len(in$)<i% then get#1,i$: in$=in$+left$(i$+chr$(0),1): goto 230
- 240 get#1,i$: dx%=asc(i$+chr$(0))
- 250 get#1,i$: dy%=asc(i$+chr$(0))
- 260 get#1,i$: dl%=asc(i$+chr$(0))
- 270 get#1,i$: dr%=asc(i$+chr$(0))
- 280 get#1,i$: do%=asc(i$+chr$(0))
- 290 get#1,i$: du%=asc(i$+chr$(0))
- 300 ct=52224
- 310 for i=0 to 255
- 320 : get#1,i$: poke ct+i,asc(i$+chr$(0))
- 330 next i
- 340 close 1
- 350 open 2,d1%,d2%: print#2,in$;
- 360 pr%=-1: cr$=chr$(13)
- 370 if dz%<do% then print#2,cr$;: dz%=dz%+1: goto 370
- 380 print#2,left$(l$,dl%);: goto 6490
- 390 :
- 400 rem input
- 410 :
- 420 i$="":p%=1: goto 440
- 430 print t$;
- 440 print "";mid$(i$+" ",p%,1);"[157]";
- 450 get t$: if t$="" then 450
- 460 print "[146]";mid$(i$+" ",p%,1);"[157]";: a=asc(t$)
- 470 if p%<41 then if t$=" " or (t$>="#" and t$<="z") then 540
- 480 if p%<41 then if (t$>="[193]" and t$<="[218]") then 540
- 490 if t$="" and p%<=len(i$) then p%=p%+1: goto 430
- 500 if t$="[157]" and p%>1 then p%=p%-1: goto 430
- 510 if a=20 and p%>1 then 560
- 520 if a=13 then pr$=i$+chr$(13):print : goto 630
- 530 goto 440
- 540 if p%=len(i$)+1 then i$=i$+t$: p%=p%+1: goto 430
- 550 i$=left$(i$,p%-1)+t$+right$(i$,len(i$)-p%): p%=p%+1: goto 430
- 560 i$=left$(i$,p%-2)+right$(i$,len(i$)-p%+1): p%=p%-1: goto 430
- 570 :
- 580 rem drucke
- 590 :
- 600 pr$=chr$(13): goto 620
- 610 pr$=pr$+chr$(13)
- 620 st$=ti$: print pr$;
- 630 if pr%=0 then return
- 640 pr%=1
- 650 if pr%>len(pr$) then return
- 660 : q$=mid$(pr$,pr%,1): if q$=c1$ or q$=c2$ then 780
- 670 : c%=peek(ct+asc(q$))
- 680 : print#2,chr$(c%);
- 690 : if c%<>13 then 780
- 700 : dz%=dz%+1
- 710 : if dz%>=dy%-du% and dz%<dy% then print#2,cr$;: dz%=dz%+1: goto 710
- 720 : if dz%<dy% then 770
- 730 : ds%=ds%+1: dz%=dz%-dy%
- 740 : print ds%;"[211]eite(n) voll - [212]aste!"
- 750 : get q$: if q$="" then 750
- 760 : if dz%<do% then print#2,cr$;: dz%=dz%+1: goto 760
- 770 : print#2,left$(l$,dl%);
- 780 pr%=pr%+1: goto 650
- 790 ti$=st$: return
- 800 :
- 810 rem dimensioniere
- 820 :
- 830 ml=8: w$=left$("[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]",ml)
- 840 l$=" "
- 850 rem def fnpt(x)=int(2^(x-1)+.001)
- 860 def fnlg(x)=log(x)/log(2)+1.0005
- 870 def fnpl(x)=(x=1orx=2orx=4orx=8orx=16orx=32orx=64orx=128orx=256orx=512)
- 880 q=0:z1=0:z2=0:a=0:b=0:c=0:w=0:i=0:f=0:f1=0
- 890 :
- 900 sm%=12: zm%=10: rem maximalwerte
- 910 dim pt%(zm%+1)
- 920 dim f$(sm%),b$(sm%,zm%): rem oberbegriffe, objekte
- 930 qm%=.5*sm%*(sm%-1): rem quadrate
- 940 dim bx%(qm%,zm%),by%(qm%,zm%),ex%(qm%,zm%),ey%(qm%,zm%)
- 950 rm%=20: rem max. relative beziehungen
- 960 dim ro%(rm%),rp%(rm%),r1%(rm%,1),r2%(rm%,1),k%(2*zm%,1),kb%(2*zm%),ko%(sm%)
- 970 dim s1%(qm%),s2%(qm%)
- 980 dim q%(sm%,sm%)
- 990 return
- 1000 :
- 1010 rem initialisiere
- 1020 :
- 1030 q%=1: for e=1 to zm%+1: pt%(e)=q%: q%=q%*2: next e
- 1040 qm%=.5*sm%*(sm%-1): rem quadrate
- 1050 bw%=pt%(zm%+1)-1
- 1060 rem oberbegriffe s1% und s2% von quadrat q%
- 1070 q%=0
- 1080 for y=sm% to 2 step-1
- 1090 : for x=1 to y-1
- 1100 : q%=q%+1: s1%(q%)=x: s2%(q%)=y
- 1110 next x,y
- 1120 rem quadrat q% von oberbegriffen s1 und s2
- 1130 for s1=0 to sm%
- 1140 : for s2=0 to sm%
- 1150 : q%(s1,s2)=-1
- 1160 : if s1<s2 then q%(s1,s2)=s1+(sm%-s2)*sm%-0.5*(sm%-s2)*(sm%-s2+1)
- 1170 : if s1>s2 then q%(s1,s2)=s2+(sm%-s1)*sm%-0.5*(sm%-s1)*(sm%-s1+1)
- 1180 next s2,s1
- 1190 return
- 1200 :
- 1210 rem speichere
- 1220 :
- 1230 pr$="[196]ateiname? ": gosub 620: gosub 420: if i$="" then return
- 1240 n$=i$+".log"
- 1250 open 1,8,15,("s:"+n$): close 1
- 1260 open 1,8,2,n$+",s,w"
- 1270 print#1,sm%: print#1,zm%
- 1280 for s=1 to sm%: print#1,f$(s)
- 1290 : for z=1 to zm%: print#1,b$(s,z)
- 1300 next z,s
- 1310 for q=1 to qm%
- 1320 : for e=1 to zm%
- 1330 : print#1,ex%(q,e): print#1,ey%(q,e)
- 1340 : print#1,bx%(q,e): print#1,by%(q,e)
- 1350 next e,q
- 1360 print#1,ra%: if ra%=0 then 1420
- 1370 for r=1 to ra%
- 1380 : print#1,ro%(r): print#1,rp%(r)
- 1390 : print#1,r1%(r,0): print#1,r1%(r,1)
- 1400 : print#1,r2%(r,0): print#1,r2%(r,1)
- 1410 next r
- 1420 close 1
- 1430 pr$="[196]atei ist gespeichert.": gosub 610
- 1440 return
- 1450 :
- 1460 rem lade
- 1470 :
- 1480 pr$="[196]ateiname? ": gosub 620: gosub 420: if i$="" then return
- 1490 n$=i$+".log"
- 1500 open 1,8,2,n$+",s,r"
- 1510 input#1,sm%: input#1,zm%
- 1520 gosub 1030 initialisiere
- 1530 for s=1 to sm%: input#1,f$(s)
- 1540 : for z=1 to zm%: input#1,b$(s,z)
- 1550 next z,s
- 1560 for q=1 to qm%
- 1570 : for e=1 to zm%
- 1580 : input#1,ex%(q,e): input#1,ey%(q,e)
- 1590 : input#1,bx%(q,e): input#1,by%(q,e)
- 1600 next e,q
- 1610 input#1,ra%: if ra%=0 then 1670
- 1620 for r=1 to ra%
- 1630 : input#1,ro%(r): input#1,rp%(r)
- 1640 : input#1,r1%(r,0): input#1,r1%(r,1)
- 1650 : input#1,r2%(r,0): input#1,r2%(r,1)
- 1660 next r
- 1670 close 1
- 1680 pr$="[196]atei ist geladen.": gosub 610
- 1690 return
- 1700 :
- 1710 rem lass eingeben
- 1720 :
- 1730 gosub 600
- 1740 pr$="[215]ieviele [199]ruppen (2-12)? ": gosub 620:gosub 420: sm%=val(i$)
- 1750 pr$="[215]ieviele [197]inheiten (2-10)? ": gosub 620:gosub 420: zm%=val(i$)
- 1760 gosub 1030 initialisiere
- 1770 gosub 600
- 1780 pr$="[194]itte jetzt die [207]bjekte eingeben": gosub 610
- 1790 pr$="- alle unterschiedlich benannt": gosub 610
- 1800 pr$="- gegebenenfalls in ihrer natuerlichen": gosub 610
- 1810 pr$=" [207]rdnung": gosub 610
- 1820 gosub 600
- 1830 for s=1 to sm%
- 1840 : pr$="[207]berbegriff von [199]ruppe "+chr$(192+s)+" ? ":gosub 620:gosub 420: f$(s)=i$
- 1850 : if f$(s)="" then f$(s)=chr$(192+s)
- 1860 : pr$="[194]itte"+str$(zm%)+" davon eingeben!": gosub 610
- 1870 : for z=1 to zm%
- 1880 : pr$="? ": gosub 620:gosub 420: b$(s,z)=i$
- 1890 : if b$(s,z)="" then b$(s,z)=chr$(64+s)+chr$(48+z)
- 1900 : next z
- 1910 next s
- 1920 for q=1 to qm%
- 1930 : for e=1 to zm%
- 1940 : ex%(q,e)=bw%: ey%(q,e)=bw%
- 1950 : bx%(q,e)=bw%: by%(q,e)=bw%
- 1960 next e,q
- 1970 ra%=0
- 1980 return
- 1990 :
- 2000 rem finde begriffsposition
- 2010 :
- 2020 s1%=-1
- 2030 for s=1 to sm%
- 2040 : for z=1 to zm%
- 2050 : if p$=b$(s,z) then s1%=s: z1=z
- 2060 next z,s
- 2070 if s1%=-1 then pr$=c2$+"[207]bjekt nicht erkannt."+c1$: gosub 610
- 2080 return
- 2090 :
- 2100 rem nenne begriff um
- 2110 :
- 2120 for s=1 to sm%
- 2130 : if f$(s)=b$ then f$(s)=a$: b$=""
- 2140 next s
- 2150 if b$="" then return
- 2160 :
- 2170 p$=b$: gosub 2020 begriffsposition
- 2180 if s1%=-1 then return
- 2190 b$(s1%,z1)=a$: return
- 2200 :
- 2210 rem gib objekte aus
- 2220 :
- 2230 gosub 600
- 2240 for s=1 to sm%
- 2250 : pr$=c2$+f$(s)+c1$: gosub 610
- 2260 : for z=1 to zm%
- 2270 : pr$=" "+b$(s,z): gosub 610
- 2280 : next z
- 2290 next s
- 2300 return
- 2310 :
- 2320 rem nimm beziehung auf
- 2330 :
- 2340 p$=b$: gosub 2020 begriffsposition
- 2350 if s1%=-1 then return
- 2360 s2%=s1%:z2=z1
- 2370 p$=a$: gosub 2020 begriffsposition
- 2380 if s1%=-1 then return
- 2390 if k$="+" or k$="-" or k$="?" then 2510
- 2400 if s1%=ro% or s2%=ro% then pr$=c2$+"[194]ez. nicht relativ."+c1$: gosub 610: return
- 2410 if ra%<rm% then 2440
- 2420 pr$=c2$+"[211]peicher fuer relative [194]eziehungen ist": gosub 610
- 2430 pr$="voll. [197]ingabe nicht akzeptiert."+c1$: gosub 610: return
- 2440 ra%=ra%+1: pr$=str$(ra%)+" relative [194]eziehung(en) vorgemerkt.": gosub 610
- 2450 rp%(ra%)=rp%: ro%(ra%)=ro%
- 2460 r1%(ra%,0)=s1%: r1%(ra%,1)=z1
- 2470 r2%(ra%,0)=s2%: r2%(ra%,1)=z2
- 2480 if s1%=s2% then return
- 2490 k$="-"
- 2500 :
- 2510 if s1%=s2% then pr$=c2$+"[194]eziehung nicht verwertbar."+c1$: gosub 610: return
- 2520 if s1%>s2% then i%=s1%:s1%=s2%:s2%=i%: i%=z1:z1=z2:z2=i%
- 2530 q=q%(s1%,s2%)
- 2540 if k$<>"-" then 2570
- 2550 ex%(q,z2)=ex%(q,z2) and (bw%-pt%(z1))
- 2560 ey%(q,z1)=ey%(q,z1) and (bw%-pt%(z2))
- 2570 if k$<>"+" then 2640
- 2580 for e=1 to zm%
- 2590 : if e=z2 then ex%(q,z2)=pt%(z1)
- 2600 : if e<>z2 then ex%(q,e)=ex%(q,e) and (bw%-pt%(z1))
- 2610 : if e=z1 then ey%(q,z1)=pt%(z2)
- 2620 : if e<>z1 then ey%(q,e)=ey%(q,e) and (bw%-pt%(z2))
- 2630 next e
- 2640 if k$<>"?" then 2670
- 2650 ex%(q,z2)=ex%(q,z2) or pt%(z1)
- 2660 ey%(q,z1)=ey%(q,z1) or pt%(z2)
- 2670 return
- 2680 :
- 2690 rem eleminiere rel. bez.
- 2700 :
- 2710 ra%=0
- 2720 pr$="[193]lle rel. [194]eziehungen eleminiert.": gosub 610
- 2730 return
- 2740 :
- 2750 rem eleminiere folgebez.
- 2760 :
- 2770 for q=1 to qm%
- 2780 : for e=1 to zm%
- 2790 : bx%(q,e)=bw%: by%(q,e)=bw%
- 2800 : next e,q
- 2810 pr$="[193]lle [198]olgebeziehungen eleminiert.": gosub 610
- 2820 wi%=0
- 2830 return
- 2840 :
- 2850 rem decke widerspruch auf
- 2860 :
- 2870 pr$=c2$+"[215]iderspruch. [207]bjekt kann einer [199]ruppe": gosub 610
- 2880 pr$="nicht zugeordnet werden.": gosub 610
- 2890 if bx%(q,e)=0 then pr$=b$(s2%(q),e)+", "+f$(s1%(q)): gosub 610
- 2900 if by%(q,e)=0 then pr$=b$(s1%(q),e)+", "+f$(s2%(q)): gosub 610
- 2910 pr$="[203]orrektur der [197]ingangsbeziehungen": gosub 610
- 2920 pr$="ist erforderlich. [194]itte warten."+c1$: gosub 610
- 2930 wi%=-1
- 2940 return
- 2950 :
- 2960 rem setze minuszeichen
- 2970 :
- 2980 a=q%(s1%,s2%)
- 2990 if s1%<s2% then b=z1: c=z2
- 3000 if s1%>s2% then b=z2: c=z1
- 3010 :
- 3020 if wi% or (bx%(a,c) and pt%(b))=0 then return
- 3030 bx%(a,c)=bx%(a,c) and (bw%-pt%(b))
- 3040 by%(a,b)=by%(a,b) and (bw%-pt%(c))
- 3050 if bx%(a,c)=0 then q=a: e=c: gosub 2870: bx%(a,c)=bx%(a,c) or pt%(b):return
- 3060 if by%(a,b)=0 then q=a: e=b: gosub 2870: by%(a,b)=by%(a,b) or pt%(c):return
- 3070 f%=-1: m%=m%+1
- 3080 if i$=ii$ then 3110
- 3090 if len(i$)<10 then pr$=" "+i$+left$(l$,10-len(i$)): gosub 620: goto 3120
- 3100 pr$=" "+i$: gosub 610
- 3110 pr$=" ": gosub 620
- 3120 pr$=b$(s1%(a),b)+"-"+b$(s2%(a),c): gosub 610: ii$=i$: return
- 3130 :
- 3140 rem stelle bez. fest
- 3150 :
- 3160 b%=0
- 3170 if s1%<>s2% then 3200
- 3180 if z1=z2 then b%=-1: return
- 3190 return
- 3200 a=q%(s1%,s2%)
- 3210 if s1%<s2% then b=z1: c=z2
- 3220 if s1%>s2% then b=z2: c=z1
- 3230 if (bx%(a,c) and pt%(b))=pt%(b) then b%=-1
- 3240 return
- 3250 :
- 3260 rem gib beziehungen aus
- 3270 :
- 3280 pr$="[197]ingangsbez. betont":gosub 610
- 3290 pr$="[198]olgebez. unbetont": gosub 610
- 3300 for q=1 to qm%
- 3310 : pr$=chr$(13)+c2$+f$(s2%(q))+" und "+f$(s1%(q))+c1$+chr$(13): gosub 610
- 3320 : for q2=1 to zm%
- 3330 : pr$=" "
- 3340 : for q1=1 to zm%
- 3350 : if (ex%(q,q2) and pt%(q1))=0 then pr$=pr$+c2$+"- ": goto 3380
- 3360 : if (bx%(q,q2) and pt%(q1))=0 then pr$=pr$+c1$+"- ": goto 3380
- 3370 : pr$=pr$+" "
- 3380 : next q1
- 3390 : pr$=pr$+c1$+left$(b$(s2%(q),q2),ml): gosub 610
- 3400 : next q2
- 3410 : for p=1 to ml
- 3420 : pr$=" "
- 3430 : for z=1 to zm%
- 3440 : pr$=pr$+mid$(b$(s1%(q),z)+l$,p,1)+" "
- 3450 : next z
- 3460 : gosub 610
- 3470 : next p
- 3480 next q
- 3490 gosub 600
- 3500 :
- 3510 if ra%=0 then return
- 3520 for r=1 to ra%
- 3530 : pr$=str$(r)+". ": gosub 620
- 3540 : if rp%(r)=0 then pr$="<": gosub 620
- 3550 : if rp%(r)=-1 then pr$="#": gosub 620
- 3560 : if rp%(r)>0 then pr$=chr$(48+rp%(r))+"<": gosub 620
- 3570 : pr$=f$(ro%(r))+" ": gosub 620
- 3580 : pr$=b$(r1%(r,0),r1%(r,1))+",": gosub 620
- 3590 : pr$=b$(r2%(r,0),r2%(r,1)): gosub 610
- 3600 next r
- 3610 return
- 3620 :
- 3630 rem rechne
- 3640 :
- 3650 pr$="[210]echenvorgang:"+chr$(13): gosub 610
- 3660 ti$="000000"
- 3670 for q=1 to qm%
- 3680 : for e=1 to zm%
- 3690 : bx%(q,e)=bx%(q,e) and ex%(q,e)
- 3700 : by%(q,e)=by%(q,e) and ey%(q,e)
- 3710 next e,q
- 3720 :
- 3730 m%=0: mm%=qm%*(zm%*zm%-zm%)
- 3740 for q=1 to qm%
- 3750 : for e=1 to zm%
- 3760 : if bx%(q,e)=0 or by%(q,e)=0 then gosub 2870
- 3770 : for b=1 to zm%
- 3780 : if (bx%(q,e) and pt%(b))=0 then m%=m%+1
- 3790 next b,e,q
- 3800 if wi% then gosub 2770: return
- 3810 :
- 3820 pr$="[194]ekannt:"+str$(int(100*m%/mm%+.5))+" %": gosub 610
- 3830 f%=0
- 3840 pr$=c2$+"[197]rgaenze..."+c1$: gosub 610
- 3850 for q=1 to qm%
- 3860 : i$="q"+mid$(str$(q),2)
- 3870 : for y=1 to zm%
- 3880 : if not fnpl(bx%(q,y)) then 3940
- 3890 : x=fnlg(bx%(q,y))
- 3900 : if by%(q,x)=pt%(y) then 3940
- 3910 : for e=1 to zm%
- 3920 : if e<>y then a=q: b=x: c=e: gosub 3020
- 3930 : next e
- 3940 : next y
- 3950 : for x=1 to zm%
- 3960 : if not fnpl(by%(q,x)) then 4020
- 3970 : y=fnlg(by%(q,x))
- 3980 : if bx%(q,y)=pt%(x) then 4020
- 3990 : for e=1 to zm%
- 4000 : if e<>x then a=q: b=e: c=y: gosub 3020
- 4010 : next e
- 4020 : next x
- 4030 next q: if sm%<3 or wi% then 4440
- 4040 :
- 4050 pr$=c2$+"[213]ebertrage..."+c1$: gosub 610
- 4060 y%=1
- 4070 : x%=1
- 4080 : q1=q%(x%,sm%-y%+1)
- 4090 : for n=1 to sm%-x%-y%
- 4100 : q2=q%(x%+n,sm%-y%+1)
- 4110 : q3=q%(x%,x%+n)
- 4120 : i$="q"+mid$(str$(q1),2)+","+mid$(str$(q2),2)+","+mid$(str$(q3),2)
- 4130 : for z=1 to zm%
- 4140 : v=bx%(q2,z): if v=bw% or fnpl(bx%(q1,z)) then 4180
- 4150 : a=q1: c=z: for b=1 to zm%
- 4160 : if (v and (bw%-by%(q3,b)))=v then gosub 3020
- 4170 : next b
- 4180 : v=by%(q3,z): if v=bw% or fnpl(by%(q1,z)) then 4220
- 4190 : a=q1: b=z: for c=1 to zm%
- 4200 : if (v and (bw%-bx%(q2,c)))=v then gosub 3020
- 4210 : next c
- 4220 : v=bx%(q1,z): if v=bw% or fnpl(bx%(q2,z)) then 4260
- 4230 : a=q2: c=z: for b=1 to zm%
- 4240 : if (v and (bw%-bx%(q3,b)))=v then gosub 3020
- 4250 : next b
- 4260 : v=bx%(q3,z): if v=bw% or fnpl(by%(q2,z)) then 4300
- 4270 : a=q2: b=z: for c=1 to zm%
- 4280 : if (v and (bw%-bx%(q1,c)))=v then gosub 3020
- 4290 : next c
- 4300 : v=by%(q1,z): if v=bw% or fnpl(by%(q3,z)) then 4340
- 4310 : a=q3: b=z: for c=1 to zm%
- 4320 : if (v and (bw%-by%(q2,c)))=v then gosub 3020
- 4330 : next c
- 4340 : v=by%(q2,z): if v=bw% or fnpl(bx%(q3,z)) then 4390
- 4350 : a=q3: c=z: for b=1 to zm%
- 4360 : if (v and (bw%-by%(q1,b)))=v then gosub 3020
- 4370 : next b
- 4380 :
- 4390 : next z
- 4400 : next n
- 4410 : x%=x%+1: if x%<=sm%-y%-1 then 4080
- 4420 y%=y%+1: if y%<=sm%-2 then 4070
- 4430 :
- 4440 if ra%=0 or wi% then 5940
- 4450 pr$=c2$+"[210]elativiere..."+c1$: gosub 610
- 4460 for r=1 to ra%
- 4470 : i$="b"+mid$(str$(r),2)
- 4480 : q%=q%(ro%(r),r1%(r,0))
- 4490 : if ro%(r)<r1%(r,0) then b1%=bx%(q%,r1%(r,1))
- 4500 : if ro%(r)>r1%(r,0) then b1%=by%(q%,r1%(r,1))
- 4510 : q%=q%(ro%(r),r2%(r,0))
- 4520 : if ro%(r)<r2%(r,0) then b2%=bx%(q%,r2%(r,1))
- 4530 : if ro%(r)>r2%(r,0) then b2%=by%(q%,r2%(r,1))
- 4540 : if rp%(r)=-1 then 4870
- 4550 :
- 4560 : d%=rp%(r): if d%=0 then d%=1
- 4570 : mi%=1
- 4580 : if (b1% and pt%(mi%))=0 then mi%=mi%+1: goto 4580
- 4590 : for e=1 to mi%+d%-1
- 4600 : s1%=r2%(r,0): z1=r2%(r,1)
- 4610 : s2%=ro%(r): z2=e
- 4620 : gosub 2980
- 4630 : next e
- 4640 : ma%=zm%
- 4650 : if (b2% and pt%(ma%))=0 then ma%=ma%-1: goto 4650
- 4660 : for e=zm% to ma%-d%+1 step-1
- 4670 : s1%=r1%(r,0): z1=r1%(r,1)
- 4680 : s2%=ro%(r): z2=e
- 4690 : gosub 2980
- 4700 : next e
- 4710 :
- 4720 : if rp%(r)=0 then 5010
- 4730 : if fnpl(b1%)=0 then 4790
- 4740 : for e=mi%+d%+1 to zm%
- 4750 : s1%=r2%(r,0): z1=r2%(r,1)
- 4760 : s2%=ro%(r): z2=e
- 4770 : if e<=zm% then gosub 2980
- 4780 : next e
- 4790 : if fnpl(b2%)=0 then 5010
- 4800 : for e=ma%-d%-1 to 1 step-1
- 4810 : s1%=r1%(r,0): z1=r1%(r,1)
- 4820 : s2%=ro%(r): z2=e
- 4830 : if e>=1 then gosub 2980
- 4840 : next e
- 4850 : goto 5010
- 4860 :
- 4870 : for e=1 to zm%
- 4880 : if e>1 then if (b1% and pt%(e-1))<>0 then 4930
- 4890 : if e<zm% then if (b1% and pt%(e+1))<>0 then 4930
- 4900 : s1%=r2%(r,0): z1=r2%(r,1)
- 4910 : s2%=ro%(r): z2=e
- 4920 : gosub 2980
- 4930 : next e
- 4940 : for e=1 to zm%
- 4950 : if e>1 then if (b2% and pt%(e-1))<>0 then 5000
- 4960 : if e<zm% then if (b2% and pt%(e+1))<>0 then 5000
- 4970 : s1%=r1%(r,0): z1=r1%(r,1)
- 4980 : s2%=ro%(r): z2=e
- 4990 : gosub 2980
- 5000 : next e
- 5010 next r
- 5020 :
- 5030 rem bilde #-ketten
- 5040 :
- 5050 for r=1 to sm%: ko%(r)=0: next r
- 5060 k1%=zm%+1: k2%=zm%
- 5070 kf%=0: for r=1 to ra%
- 5080 : if rp%(r)<>-1 then 5580
- 5090 : if k1%-1<k2% then 5140
- 5100 : ro%=ro%(r): if ko%(ro%)=-1 then 5580
- 5110 : ko%(ro%)=-1
- 5120 : k1%=k1%-1: k%(k1%,0)=r1%(r,0): k%(k1%,1)=r1%(r,1)
- 5130 : k2%=k2%+1: k%(k2%,0)=r2%(r,0): k%(k2%,1)=r2%(r,1): goto 5580
- 5140 : if ro%(r)<>ro% then 5580
- 5150 :
- 5160 : s1%=r1%(r,0): z1=r1%(r,1)
- 5170 : s2%=k%(k1%,0): z2=k%(k1%,1)
- 5180 : gosub 3160 beziehung b%
- 5190 : if b%=0 then 5260
- 5200 : s1%=r2%(r,0): z1=r2%(r,1)
- 5210 : s2%=k%(k1%+1,0): z2=k%(k1%+1,1)
- 5220 : gosub 3160 beziehung b%
- 5230 : if b%<>0 then 5260
- 5240 : k1%=k1%-1: p%=k1%: goto 5570 r2% am anfang anfuegen
- 5250 :
- 5260 : s1%=r2%(r,0): z1=r2%(r,1)
- 5270 : s2%=k%(k1%,0): z2=k%(k1%,1)
- 5280 : gosub 3160 beziehung b%
- 5290 : if b%=0 then 5360
- 5300 : s1%=r1%(r,0): z1=r1%(r,1)
- 5310 : s2%=k%(k1%+1,0): z2=k%(k1%+1,1)
- 5320 : gosub 3160 beziehung b%
- 5330 : if b%<>0 then 5360
- 5340 : k1%=k1%-1: p%=k1%: goto 5560 r1% am anfang anfuegen
- 5350 :
- 5360 : s1%=r1%(r,0): z1=r1%(r,1)
- 5370 : s2%=k%(k2%,0): z2=k%(k2%,1)
- 5380 : gosub 3160 beziehung b%
- 5390 : if b%=0 then 5460
- 5400 : s1%=r2%(r,0): z1=r2%(r,1)
- 5410 : s2%=k%(k2%-1,0): z2=k%(k2%-1,1)
- 5420 : gosub 3160 beziehung b%
- 5430 : if b%<>0 then 5460
- 5440 : k2%=k2%+1: p%=k2%: goto 5570 r2% am ende anfuegen
- 5450 :
- 5460 : s1%=r2%(r,0): z1=r2%(r,1)
- 5470 : s2%=k%(k2%,0): z2=k%(k2%,1)
- 5480 : gosub 3160 beziehung b%
- 5490 : if b%=0 then 5580 next
- 5500 : s1%=r1%(r,0): z1=r1%(r,1)
- 5510 : s2%=k%(k2%-1,0): z2=k%(k2%-1,1)
- 5520 : gosub 3160 beziehung b%
- 5530 : if b%<>0 then 5580 next
- 5540 : k2%=k2%+1: p%=k2%: goto 5560 r1% am ende anfuegen
- 5550 :
- 5560 : kf%=-1: k%(p%,0)=r1%(r,0): k%(p%,1)=r1%(r,1): goto 5580
- 5570 : kf%=-1: k%(p%,0)=r2%(r,0): k%(p%,1)=r2%(r,1)
- 5580 next r
- 5590 if kf% then 5070
- 5600 if k1%+2>k2% then 5940
- 5610 i$="#"+f$(ro%)+" "
- 5620 for i=k1% to k2%
- 5630 : i$=i$+b$(k%(i,0),k%(i,1))
- 5640 : if i<>k2% then i$=i$+","
- 5650 next i
- 5660 for i=k1% to k2%
- 5670 : kb%(i)=0
- 5680 next i
- 5690 for p=1 to zm%-(k2%-k1%)
- 5700 : for i=k1% to k2%
- 5710 : s1%=k%(i,0): z1=k%(i,1)
- 5720 : s2%=ro% : z2=p+i-k1%
- 5730 : gosub 3160 beziehung b%
- 5740 : if b%<>0 then kb%(i)=kb%(i) or pt%(p+i-k1%)
- 5750 : next i
- 5760 : for i=k2% to k1% step-1
- 5770 : s1%=k%(i,0): z1=k%(i,1)
- 5780 : s2%=ro% : z2=p+k2%-i
- 5790 : gosub 3160 beziehung b%
- 5800 : if b%<>0 then kb%(i)=kb%(i) or pt%(p+k2%-i)
- 5810 : next i
- 5820 next p
- 5830 :
- 5840 for i=k1% to k2%
- 5850 : for z=1 to zm%
- 5860 : if (kb%(i) and pt%(z))<>0 then 5900
- 5870 : s1%=k%(i,0): z1=k%(i,1)
- 5880 : s2%=ro%: z2=z
- 5890 : gosub 2980 lege bez. fest
- 5900 : next z
- 5910 next i
- 5920 goto 5060
- 5930 :
- 5940 if wi%=0 and f%=-1 and m%<mm% then 3820
- 5950 if wi% then gosub 2770: return
- 5960 pr$=chr$(13)+"[210]echenzeit: "+mid$(ti$,3,2)+":"+mid$(ti$,5,2)+" min"+chr$(13)
- 5970 gosub 610
- 5980 if m%=mm% then gosub 6040 gib tabelle
- 5990 if m%<mm% then pr$="[201]nformationen reichen nicht.": gosub 610
- 6000 return
- 6010 :
- 6020 rem gib a-tabelle
- 6030 :
- 6040 pr$="[176]": for i=1 to sm%-1: pr$=pr$+w$+"[178]": next: pr$=pr$+w$+"[174]":gosub 610
- 6050 pr$="[221]": for s=1 to sm%: p$=f$(s): gosub 6200: next s: gosub 610
- 6060 pr$="[171]": for i=1 to sm%-1: pr$=pr$+w$+"[219]": next: pr$=pr$+w$+"[179]":gosub 610
- 6070 for z=1 to zm%
- 6080 : pr$="[221]": p$=b$(1,z):gosub 6200
- 6090 : for s=2 to sm%
- 6100 : s1%=1 : z1=z: s2%=s :z2=0
- 6110 : q%=q%(s1%,s2%)
- 6120 : if fnpl(by%(q%,z1)) then p$=b$(s2%(q%),fnlg(by%(q%,z1))): goto 6140
- 6130 : p$="?"
- 6140 : gosub 6200
- 6150 : next s: gosub 610
- 6160 next z
- 6170 pr$="[173]": for i=1 to sm%-1: pr$=pr$+w$+"[177]": next: pr$=pr$+w$+"[189]": gosub610
- 6180 return
- 6190 :
- 6200 pr$=pr$+c2$+left$(p$+l$,ml)+c1$+"[221]": return
- 6210 :
- 6220 rem gib befehlstabelle
- 6230 :
- 6240 pr$="[194]efehlssyntax"+chr$(13): gosub 610
- 6250 pr$="[193]bsolute [194]eziehungen definieren": gosub 610
- 6260 pr$=c2$+" a-b"+c1$+" negative [194]ez. herstellen": gosub 610
- 6270 pr$=c2$+" a?b"+c1$+" [194]ez. doch offen lassen": gosub 610
- 6280 pr$=c2$+" a+b"+c1$+" kreuzweise neg. [194]ez.": gosub 610
- 6290 gosub 600
- 6300 pr$="[210]elative [194]eziehungen (hinsichtlich": gosub 610
- 6310 pr$="[207]berbegriff o) definieren": gosub 610
- 6320 pr$=c2$+" <o a,b"+c1$+" objekt a liegt vor objekt b": gosub 610
- 6330 pr$=c2$+" n<o a,b"+c1$+" a liegt n [208]laetze vor b": gosub 610
- 6340 pr$=c2$+" #o a,b"+c1$+" a und b nebeneinander": gosub 610
- 6350 pr$=chr$(13)+"[193]llgemeine [194]efehle": gosub 610
- 6360 pr$=c2$+" neu=alt"+c1$+" [194]egriff umbennen": gosub 610
- 6370 pr$=c2$+" o"+c1$+" [207]bjekte ausgeben": gosub 610
- 6380 pr$=c2$+" t"+c1$+" [193]-[212]abelle ausgeben": gosub 610
- 6390 pr$=c2$+" b"+c1$+" alle [194]eziehungen ausgeben": gosub 610
- 6400 pr$=c2$+" @f"+c1$+" [198]olgebez. eleminieren": gosub 610
- 6410 pr$=c2$+" @r"+c1$+" [210]elative [194]ez. eleminieren": gosub 610
- 6420 pr$=c2$+" l"+c1$+" [204]aden von [196]iskette": gosub 610
- 6430 pr$=c2$+" s"+c1$+" [211]peichern auf [196]iskette": gosub 610
- 6440 pr$=c2$+" r"+c1$+" [210]echnen": gosub 610
- 6450 return
- 6460 :
- 6470 rem hauptprogramm
- 6480 :
- 6490 gosub 830 dimensioniere
- 6500 c1$=chr$(158): c2$=chr$(5)
- 6510 poke 53281,11: poke 53280,0
- 6520 print chr$(8);chr$(14);c1$;chr$(147)
- 6530 pr$="[208]ower of [204]ogic": gosub 610
- 6540 pr$="[214]ersion 1.01": gosub 610
- 6550 pr$=c2$: gosub 610
- 6560 pr$="[195]opyright ([195]) 1992": gosub 610
- 6570 pr$="[205]arkt & [212]echnik [214]erlag [193][199]": gosub 610
- 6580 pr$="[214]on [201]ngolf [204]ange": gosub 610
- 6590 pr$=c1$+chr$(13): gosub 610
- 6600 :
- 6610 pr$="[215]ollen [211]ie eine [212]abelle": gosub 610
- 6620 pr$="laden(l) oder eingeben(e)? ": gosub 620
- 6630 get i$: if i$<>"l" and i$<>"e" then 6630
- 6640 pr$=i$: gosub 610
- 6650 if i$="l" then gosub 1480: goto 6670
- 6660 if i$="e" then gosub 1730
- 6670 pr$=chr$(13): gosub 610
- 6680 pr$="[194]itte jetzt alle bekannten": gosub 610
- 6690 pr$="[194]eziehungen zwischen den gesammelten": gosub 610
- 6700 pr$="[207]bjekten eingeben. [196]er [194]efehlssyntax": gosub 610
- 6710 pr$="wird mit <[210][197][212][213][210][206]> aufgelistet.": gosub 610
- 6720 gosub 600: pr$=">": gosub 620
- 6730 gosub 420
- 6740 if i$="" then gosub 6240: goto 6720
- 6750 if i$="o" then gosub 2230: goto 6720
- 6760 if i$="b" then gosub 3280: goto 6720
- 6770 if i$="l" then gosub 1480: goto 6720
- 6780 if i$="@f" then gosub 2770: goto 6720
- 6790 if i$="@r" then gosub 2710: goto 6720
- 6800 if i$="s" then gosub 1230: goto 6720
- 6810 if i$="r" then gosub 3650: goto 6720
- 6820 if i$="t" then gosub 6040: goto 6720
- 6830 if len(i$)<3 then pr$=c2$+"[198]alsche [197]ingabe."+c1$: gosub 610: goto 6730
- 6840 i%=1
- 6850 k$=mid$(i$,i%,1)
- 6860 if k$="+" then gosub 7060: gosub 2340: goto 6720
- 6870 if k$="-" then gosub 7060: gosub 2340: goto 6720
- 6880 if k$="?" then gosub 7060: gosub 2340: goto 6720
- 6890 if k$="=" then gosub 7060: gosub 2120: goto 6720
- 6900 if k$="<" then 6940
- 6910 if k$="#" then rp%=-1: goto 6960
- 6920 i%=i%+1: if i%<len(i$) then 6850
- 6930 pr$=c2$+"[194]efehl nicht erkannt."+c1$: gosub 610: goto 6720
- 6940 if i%=1 then rp%=0
- 6950 if i%>1 then rp%=val(left$(i$,i%-1))
- 6960 ro%=0: i%=i%+1
- 6970 for o=1 to sm%
- 6980 : if mid$(i$,i%,len(f$(o))+1)=f$(o)+" " then ro%=o
- 6990 next o
- 7000 if ro%=0 then pr$=c2$+"[207]rdnungskriterium nicht erkannt."+c1$:gosub610:goto 6720
- 7010 i$=mid$(i$,i%+len(f$(ro%))+1): i%=1
- 7020 if mid$(i$,i%,1)="," then gosub 7060: gosub 2340: goto 6720
- 7030 i%=i%+1: if i%<=len(i$) then 7020
- 7040 pr$=c2$+"[203]omma fehlt."+c1$: gosub 610: goto 6720
- 7050 :
- 7060 a$=mid$(i$,1,i%-1): b$=mid$(i$,i%+1,len(i$)-i%): return
-